﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Remoting;
using System.Windows.Forms;

namespace GL_Panel
{
    /// <summary>
    /// Starting point of the sample remoting application.
    /// The user is given a choice of starting
    /// either a remote form with OpenGL support, 
    /// which is synchronized with the TestForm, 
    /// or a simple remote camera control.
    /// Multiple remote clients can be started.
    /// </summary>
    public class GL_Program
    {
        [STAThread]
        public static void Main(String[] args)
        {
            RemotingConfiguration.Configure("./GL_Panel.exe.config", false);

            DialogResult dr = 
                MessageBox.Show("Would you like to run client with GL support?", 
                "Select type of remoting client", 
                MessageBoxButtons.YesNoCancel);

            if (dr == DialogResult.Yes)
            {
                Application.Run(new GL_Form());
            }
            else if (dr == DialogResult.No)
            {
                Application.Run(new SimpleForm());
            }
        }
    }
}
